# print('hello world')
# name = input('请输入名字')
# print(f'我的名字是：{name},类型是{type(name)}')

# print('欢迎来到')
# age = int(input('请输入你的年龄'))
# if age >= 18:
#     print('您已成年，需补交10元')
# else:
#     print('免费')
# print('祝您愉快')

# i = 0
# sum = 0
# while i < 10:
#     i += 1
#     sum += i
# print(sum)

# import random
# num = random.randint(1, 50)
# print(num)
# input_num = int(input('猜的数字是：'))
# while input_num != num:
#     if input_num > num:
#         print('猜大了')
#     elif input_num < num:
#         print('猜小了')
#     input_num = int(input('猜的数字是：'))
# print('猜对了')

# name = 'hello python ooo'
# i = 0
# for x in name:
#     if x == 'o':
#         i += 1
# print(i)

# def func():
#     print('欢迎')
#     num = int(input('体温是：'))
#     if num < 38:
#         print(f'{num}, 正常')
#     else:
#         print(f'{num},异常')
#
#
# func()

# num_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# i = 0
# new_list = []
# while i < len(num_list):
#     if num_list[i] % 2 == 0:
#         new_list.append(num_list[i])
#     i += 1
# # for item in num_list:
# #     if item % 2 == 0:
# #         new_list.append(item)
# print(new_list)

# name = '万过薪月，员序程马黑来，nohtyP学'
# new_name = name[::-1]
# print(new_name.split('，')[1].replace('来', ''))

# my_list = ['黑马程序员', '传智播客', '黑马程序员', '传智播客', 'itheima', 'itcast', 'itheima', 'itcast', 'best']
# my_set = set()
# for item in my_list:
#     my_set.add(item)
# print(my_set)

# count = 0
# with open('text.txt') as f:
#     for line in f:
#         count += str(line).count('itheima')
# print(count)

# with open('text.txt', 'a')as f:
#     f.write('hello python')
#     f.flush()

# f1 = open('bill_copy.txt', 'w')
# with open('bill.txt', 'r')as f:
#     for line in f:
#         if str(line).count('测试')>0:
#             continue
#         f1.write(line)
#     f1.flush()
# f1.close()

# i = 0
# while i < 10:
#     name = input('姓名：')
#     age = input('年龄：')
#     address = input('地址：')
#     i += 1
#     print(f'第{i}位学生姓名是{name},年龄{age},地址{address}')
#     print(f'下面录入第{i+1}位同学信息')

# class Student:
#     def __init__(self, name, age, address):
#         self.name = name
#         self.age = age
#         self.address = address
#
#
# a = int(input('一共多少个学生：'))
# for i in range(0,a):
#     stu = Student(input('name:'), int(input('age:')), input('address:'))
#     print(f"the {i+1} student's name is {stu.name}, age is {stu.age}, address is {stu.address}")

class Phone:
    __is_5g_enable = None

    def call_by_5g(self, check):
        self.__check_5g(check)
        print('正在通话中')

    def __check_5g(self, check):
        self.__is_5g_enable = check
        if self.__is_5g_enable:
            print('5g开启')
        else:
            print('5g关闭，使用4网络')


phone = Phone()
phone.call_by_5g(False)